package com.jy.adscm.operation.purchase.controller;


import com.jy.adscm.exception.AdscmSystemException;
import com.jy.adscm.operation.purchase.bean.CreatePlan;
import com.jy.adscm.operation.purchase.bean.Machinetype;
import com.jy.adscm.operation.purchase.bean.PurchasePlan;
import com.jy.adscm.operation.purchase.bean.QueryByPageParameter;
import com.jy.adscm.operation.purchase.service.MachinetypeService;
import com.jy.adscm.support.SimpleCoreResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 机器型号bom对应数量的配置表 前端控制器
 * </p>
 *
 * @author lzf
 * @since 2019-05-05
 */
@RestController
@RequestMapping("adscm/operation/purchasePlan")
public class purchasePlanController {
    @Autowired
    MachinetypeService machinetypeService;

    @RequestMapping("updateByPlan")
    public SimpleCoreResponse updateByPlan(@RequestBody Machinetype machinetype) throws Exception{
        return new SimpleCoreResponse("200","修改采购计划成功",machinetypeService.updateById(machinetype));
    }
}

